﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace PDX
{
    /// <summary>
    /// A simple base class for INotifyPropertyChanged
    /// </summary>
    public class INPC : INotifyPropertyChanged
    {
        /// <summary>
        /// Raises the <see cref="PropertyChanged"/> event.
        /// </summary>
        /// <param name="propName">Name of the property.</param>
        protected void OnPropertyChanged(string propName)
        {
            var temp = PropertyChanged;
            if (temp != null)
            {
                var args = new PropertyChangedEventArgs(propName);
                temp(this, args);
            }
        }

        /// <summary>
        /// Occurs when a property value changes.
        /// </summary>
        public event PropertyChangedEventHandler PropertyChanged;
    }
}
